package cn.woblog.android.downloader.bean;


import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import cn.woblog.android.downloader.callback.AbstractCallback;

@DatabaseTable(tableName = "download_info")
public class DownloadInfo {

	@DatabaseField(id = true)
	private long id;

	@DatabaseField
	private long cTime;

	@DatabaseField
	private int vid;

	@DatabaseField
	private int parentId;

	@DatabaseField
	private String name;

	@DatabaseField
	private String parentName;

	@DatabaseField
	private String url;

	@DatabaseField
	private String path;

	@DatabaseField
	private int watchDuration;

	@DatabaseField
	private int videoDuration;

	private boolean isChecked;

	private boolean isEditModel;

	public int getVideoDuration() {
		return videoDuration;
	}

	public void setVideoDuration(int videoDuration) {
		this.videoDuration = videoDuration;
	}

	public int getWatchDuration() {
		return watchDuration;
	}

	public void setWatchDuration(int watchDuration) {
		this.watchDuration = watchDuration;
	}

	public boolean isChecked() {
		return isChecked;
	}

	public void setChecked(boolean isChecked) {
		this.isChecked = isChecked;
	}

	public boolean isEditModel() {
		return isEditModel;
	}

	public void setEditModel(boolean isEditModel) {
		this.isEditModel = isEditModel;
	}

	@DatabaseField
	private DownloadStatus status;

	public DownloadInfo() {
		super();
		this.status = DownloadStatus.NOT_DOWNLOAD;
	}

	public int getVid() {
		return vid;
	}

	public void setVid(int vid) {
		this.vid = vid;
	}

	public long getcTime() {
		return cTime;
	}

	public void setcTime(long cTime) {
		this.cTime = cTime;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@DatabaseField
	private long size = -1;

	@DatabaseField
	private long progress;

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	private AbstractCallback callback;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public DownloadStatus getStatus() {
		return status;
	}

	public void setStatus(DownloadStatus status) {
		this.status = status;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public long getProgress() {
		return progress;
	}

	public void setProgress(long progress) {
		this.progress = progress;
	}

	public AbstractCallback getCallback() {
		return callback;
	}

	public void setCallback(AbstractCallback callback) {
		this.callback = callback;
	}

}
